package liuyao.webutils.controller;

import liuyao.webutils.utils.ImageUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@RestController
@RequestMapping("/image")
public class ImageController {

    @PostMapping("/picToText")
    public String picToText(MultipartFile filename){
        // 解析二维码
        String analyze = ImageUtils.toText(filename);
        return analyze;
    }

    @PostMapping("/merge")
    public String merge(MultipartFile filename){
        // 解析二维码
        String analyze = ImageUtils.toText(filename);
        return analyze;
    }

}
